package org.lql.chaos.rocketmq.convert;

import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.converter.StringMessageConverter;

/**
 * @author: liangqinglong
 * @date: 2025-08-15 00:44
 * @description:
 **/
public class StringMessageConvert implements MessageConverter {

	private final StringMessageConverter delegate = new StringMessageConverter();

	@Override
	public Object fromMessage(Message<?> message, Class<?> targetClass) {
		return delegate.fromMessage(message, targetClass);
	}

	@Override
	public Message<?> toMessage(Object payload, MessageHeaders headers) {
		return delegate.toMessage(payload, headers);
	}
}
